package dao;

import java.sql.SQLException;
import java.util.List;

import entity.Goods;



public interface GoodsDao {
	/*
	 * 查询所有商品方法
	 */
	public List<Goods> getgoodsList() throws SQLException;
	
	/*
	 * 根据商品名找到整条记录
	 */
	public List<Goods> getgoods(String goods_name)throws SQLException; 
	/*
	 * 添加一列商品
	 */
	public int addgoods(String goods_name,String goods_img,String goods_type,String goods_price,String goods_limit )throws SQLException;
	/*
	 * 删除一件商品
	 */
	public int delgoods(String goods_name)throws SQLException;
	/*
	 * 修改价格,name是商品的name还是用户？
	 */
	public int updataprice(String name,String price)throws SQLException;
	/*
	 * 根据商品id找到商品
	 */
	public Goods getGoodsById(int goods_id)throws SQLException;
	/*
	 * 分页查询
	 */
	public List<Goods> getPage(int page) throws SQLException;
	
	/*
	 * 商品总数
	 */
	public int getCount() throws SQLException;
}